<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>拓展：注意事项 | Python 数据分析学习目录</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../Python可视化/绘图库-Matplotlib/6pylab.html" />
    
    
    <link rel="prev" href="../../Python可视化/绘图库-Matplotlib/4数学计算展示图像.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="5.6"
        data-chapter-title="拓展：注意事项"
        data-filepath="Python可视化/绘图库-Matplotlib/5注意事项.md"
        data-basepath="../.."
        data-revision="Wed Oct 24 2018 21:30:49 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        数据分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="Python数据分析序言/内容序言.html">
            
                
                    <a href="../../Python数据分析序言/内容序言.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Python数据分析内容
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="python数据分析环境和工具/Python数据分析相关.html">
            
                
                    <a href="../../python数据分析环境和工具/Python数据分析相关.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        python数据分析环境和工具
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="python数据分析环境和工具/1Python数据课程软件和环境安装.html">
            
                
                    <a href="../../python数据分析环境和工具/1Python数据课程软件和环境安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Python数据课程 软件和环境安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="python数据分析环境和工具/2python发行版.html">
            
                
                    <a href="../../python数据分析环境和工具/2python发行版.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        python发行版
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="python数据分析环境和工具/5交互式编辑器-JupyterNotebook.html">
            
                
                    <a href="../../python数据分析环境和工具/5交互式编辑器-JupyterNotebook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        交互式编辑器-JupyterNotebook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="python数据分析环境和工具/5.1Jupyter-notebook拓展应用.html">
            
                
                    <a href="../../python数据分析环境和工具/5.1Jupyter-notebook拓展应用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        Jupyter-notebook拓展应用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="python数据分析环境和工具/包和环境管理器：conda.html">
            
                
                    <a href="../../python数据分析环境和工具/包和环境管理器：conda.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        包和环境管理器：conda
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="python数据分析环境和工具/pip和Virtualenv.html">
            
                
                    <a href="../../python数据分析环境和工具/pip和Virtualenv.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        pip和Virtualenv
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="python数据分析环境和工具/3Markdown.html">
            
                
                    <a href="../../python数据分析环境和工具/3Markdown.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        标记语言：Markdown
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="python数据分析环境和工具/4Markdown语法.html">
            
                
                    <a href="../../python数据分析环境和工具/4Markdown语法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.1.</b>
                        
                        Markdown语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.2" data-path="python数据分析环境和工具/6Gitbook文档.html">
            
                
                    <a href="../../python数据分析环境和工具/6Gitbook文档.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.2.</b>
                        
                        文档管理工具-Gitbook
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="数据分析库的初步认识/index.html">
            
                
                    <a href="../../数据分析库的初步认识/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        数据分析库-Pandas
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="数据分析库的初步认识/Pandas创建.html">
            
                
                    <a href="../../数据分析库的初步认识/Pandas创建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        pandas
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="数据分析库的初步认识/Series创建.html">
            
                
                    <a href="../../数据分析库的初步认识/Series创建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        Series
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="数据分析库的初步认识/DataFrame创建.html">
            
                
                    <a href="../../数据分析库的初步认识/DataFrame创建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        DataFrame对象-创建
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" >
            
            <span><b>4.</b> 数据分析库的操作</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="数据分析库的操作/1DataFrame查询1-整体.html">
            
                
                    <a href="../../数据分析库的操作/1DataFrame查询1-整体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        DataFrame查询1-整体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="数据分析库的操作/2DataFrame查询2-专用查询.html">
            
                
                    <a href="../../数据分析库的操作/2DataFrame查询2-专用查询.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        DataFrame查询2-专用查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="数据分析库的操作/3DataFrame查询3-专有查询：过滤查询.html">
            
                
                    <a href="../../数据分析库的操作/3DataFrame查询3-专有查询：过滤查询.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        DataFrame查询3-专有查询：过滤查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="数据分析库的操作/4Pandas对象的数据操作：增删改查.html">
            
                
                    <a href="../../数据分析库的操作/4Pandas对象的数据操作：增删改查.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        Pandas对象的数据操作：增删改查
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.4.1" data-path="数据分析库的操作/5Pandas数据操作：其他操作.html">
            
                
                    <a href="../../数据分析库的操作/5Pandas数据操作：其他操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.1.</b>
                        
                        Pandas数据操作：其他操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4.2" data-path="数据分析库的操作/6Pandas数据存取.html">
            
                
                    <a href="../../数据分析库的操作/6Pandas数据存取.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.2.</b>
                        
                        Pandas数据存取
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4.3" data-path="数据分析库的操作/7Pandas数据运算.html">
            
                
                    <a href="../../数据分析库的操作/7Pandas数据运算.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.3.</b>
                        
                        Pandas数据运算
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.4.3.1" data-path="数据分析库的操作/7.1Pandas数据运算拓展.html">
            
                
                    <a href="../../数据分析库的操作/7.1Pandas数据运算拓展.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.3.1.</b>
                        
                        Pandas数据运算-拓展
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.4.4" data-path="数据分析库的操作/8Pandas分组聚合1.html">
            
                
                    <a href="../../数据分析库的操作/8Pandas分组聚合1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.4.</b>
                        
                        Pandas分组聚合1
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4.5" data-path="数据分析库的操作/9Pandas分组聚合2.html">
            
                
                    <a href="../../数据分析库的操作/9Pandas分组聚合2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.5.</b>
                        
                        Pandas分组聚合2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4.6" data-path="数据分析库的操作/10Pandas数据规整-清理.html">
            
                
                    <a href="../../数据分析库的操作/10Pandas数据规整-清理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.6.</b>
                        
                        Pandas数据规整-清理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4.7" data-path="数据分析库的操作/11Pandas数据规整-转换.html">
            
                
                    <a href="../../数据分析库的操作/11Pandas数据规整-转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.7.</b>
                        
                        Pandas数据规整-转换
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.4.7.1" data-path="数据分析库的操作/14Pandas数据规整-转换-离散化和面元划分.html">
            
                
                    <a href="../../数据分析库的操作/14Pandas数据规整-转换-离散化和面元划分.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.7.1.</b>
                        
                        离散化和面元划分
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.4.8" data-path="数据分析库的操作/16Pandas数据规整-合并.html">
            
                
                    <a href="../../数据分析库的操作/16Pandas数据规整-合并.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.8.</b>
                        
                        Pandas数据规整-合并
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="数据分析库的操作/13Pandas数据规整-重塑和轴向旋转.html">
            
                
                    <a href="../../数据分析库的操作/13Pandas数据规整-重塑和轴向旋转.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        Pandas数据规整-重塑和轴向旋转
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.5.1" data-path="数据分析库的操作/13.1透视表和交叉表.html">
            
                
                    <a href="../../数据分析库的操作/13.1透视表和交叉表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.1.</b>
                        
                        透视表和交叉表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="Python可视化/绘图库-Matplotlib.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Python可视化
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="Python可视化/绘图库-Matplotlib/Matplotlib常见图表.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/Matplotlib常见图表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        基础：Matplotlib常见图表
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="Python可视化/绘图库-Matplotlib/Matplotlib常见设置和操作.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/Matplotlib常见设置和操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.1.</b>
                        
                        Matplotlib常见设置和操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="Python可视化/绘图库-Matplotlib/1Matplotlib-绘图区域.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/1Matplotlib-绘图区域.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        提升：绘图区域
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="Python可视化/绘图库-Matplotlib/2Matplotlib-图像组件.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/2Matplotlib-图像组件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        提升：绘图组件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="Python可视化/绘图库-Matplotlib/3Matplotlib-高级绘图.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/3Matplotlib-高级绘图.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        拓展：高级绘图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="Python可视化/绘图库-Matplotlib/4数学计算展示图像.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/4数学计算展示图像.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        拓展：数学计算展示图像
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="5.6" data-path="Python可视化/绘图库-Matplotlib/5注意事项.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/5注意事项.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        拓展：注意事项
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="Python可视化/绘图库-Matplotlib/6pylab.html">
            
                
                    <a href="../../Python可视化/绘图库-Matplotlib/6pylab.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        拓展：pylab
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="数据分析必备知识点/数据分析必备知识点汇集.html">
            
                
                    <a href="../../数据分析必备知识点/数据分析必备知识点汇集.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        数据分析必备知识点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="数据分析必备知识点/数据分析流程.html">
            
                
                    <a href="../../数据分析必备知识点/数据分析流程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        数据分析流程
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >Python 数据分析学习目录</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="matplotlib&#x7ED8;&#x56FE;&#x6CE8;&#x610F;&#x4E8B;&#x9879;">Matplotlib-&#x7ED8;&#x56FE;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</h1>
<hr>
<h1 id="&#x56FE;&#x50CF;&#x5728;retina&#x5C4F;&#x5E55;&#x4E2D;&#x663E;&#x793A;&#x6A21;&#x7CCA;">&#x56FE;&#x50CF;&#x5728;Retina&#x5C4F;&#x5E55;&#x4E2D;&#x663E;&#x793A;&#x6A21;&#x7CCA;</h1>
<p>&#x5728;Mac&#x7535;&#x8111;&#x7ED8;&#x56FE;&#xFF0C;Retina&#x5C4F;&#x4E0B;&#x56FE;&#x50CF;&#x663E;&#x793A;&#x5F88;&#x6A21;&#x7CCA;&#xFF0C;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#xFF0C;Jupyter-notebook&#x7ED8;&#x56FE;&#x524D;&#x5148;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x9B54;&#x672F;&#x547D;&#x4EE4;&#xFF1A;</p>
<blockquote>
<p>%config InlineBackend.figure_format = &apos;retina&apos;</p>
</blockquote>
<hr>
<h1 id="&#x4E2D;&#x6587;&#x663E;&#x793A;&#x4E71;&#x7801;">&#x4E2D;&#x6587;&#x663E;&#x793A;&#x4E71;&#x7801;</h1>
<p>Matplotlib&#x9ED8;&#x8BA4;&#x4E0D;&#x652F;&#x6301;&#x4E2D;&#x6587;&#x5B57;&#x7B26;&#xFF0C;&#x56E0;&#x4E3A;&#x9ED8;&#x8BA4;&#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x662F;sans-serif&#x82F1;&#x6587;&#x5B57;&#x4F53;&#x4E0D;&#x80FD;&#x663E;&#x793A;&#x6C49;&#x5B57;</p>
<p>&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#xFF1A;&#x4FEE;&#x6539;Matplotlib&#x9ED8;&#x8BA4;&#x8BBE;&#x7F6E;&#xFF0C;&#x52A0;&#x5165;&#x4E2D;&#x6587;&#x5B57;&#x4F53;&#x652F;&#x6301;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> matplotlib.pyplot <span class="hljs-keyword">as</span> plt
plt.rcParams[<span class="hljs-string">&apos;font.family&apos;</span>] = [<span class="hljs-string">&apos;Arial Unicode MS&apos;</span>, <span class="hljs-string">&apos;Microsoft Yahei&apos;</span>, <span class="hljs-string">&apos;SimHei&apos;</span>, <span class="hljs-string">&apos;sans-serif&apos;</span>] <span class="hljs-comment">#  &#x5168;&#x5C40;&#x8BBE;&#x7F6E;&#x652F;&#x6301;&#x4E2D;&#x6587;&#x5B57;&#x4F53;&#xFF0C;&#x9ED8;&#x8BA4; sans-serif</span>
</code></pre>
<ul>
<li>Arial Unicode MS&#x5B57;&#x4F53;Windows(<strong>&#x6CE8;&#x610F;&#x975E;&#x7CBE;&#x7B80;&#x7248;&#x624D;&#x6709;</strong>)&#xFF0F;MacOS&#x7CFB;&#x7EDF;&#x81EA;&#x5E26;(&#x652F;&#x6301;&#x4E2D;&#x65E5;&#x97E9;&#x82F1;&#x6587;&#x5B57;)&#xFF0C;sans-serif&#x5B57;&#x4F53;&#x4E3A;&#x9ED8;&#x8BA4;&#x82F1;&#x6587;&#x5B57;&#x4F53;</li>
<li>&#x67D0;&#x4E9B;&#x4E2D;&#x6587;&#x5B57;&#x4F53;&#x5728;&#x7ED8;&#x56FE;&#x65F6;&#x5750;&#x6807;&#x8F74;&#x8D1F;&#x53F7;&#x4F1A;&#x663E;&#x793A;&#x4E71;&#x7801;&#xFF0C;&#x4F8B;&#x5982; SimHei &#x9ED1;&#x4F53;</li>
<li>&#x6CE8;&#x610F;&#xFF1A;&#x7531;&#x4E8E;Matplotlib&#x53EA;&#x652F;&#x6301;ttf&#x5B57;&#x4F53;&#xFF0C;Ubuntu&#x5185;&#x7684;&#x4E2D;&#x6587;&#x5B57;&#x4F53;&#x90FD;&#x4E3A;ttc&#x683C;&#x5F0F;&#xFF0C;&#x6240;&#x4EE5;&#x9700;&#x8981;<strong>&#x5B89;&#x88C5;&#x4E00;&#x4E2A;&#x4E2D;&#x6587;ttf&#x5B57;&#x4F53;</strong>&#xFF1A;&#x6B65;&#x9AA4;&#x5982;&#x4E0B;&#xFF1A;<ul>
<li>&#x4E0B;&#x8F7D; <code>arial unicode ms.ttf</code> &#x5B57;&#x4F53;&#x5230; /home &#x76EE;&#x5F55;</li>
<li>&#x62F7;&#x8D1D;&#x5B57;&#x4F53;&#x5230; usr/share/fonts &#x4E0B;&#xFF1A;<ul>
<li><code>sudo cp ~/arial\ unicode\ ms.ttf /usr/share/fonts/arial\ unicode\ ms.ttf</code></li>
</ul>
</li>
<li>&#x5220;&#x9664;matplotlib&#x5B57;&#x4F53;&#x7F13;&#x5B58;&#xFF1A;<code>rm -rf ~/.cache/matplotlib/fontList.json</code></li>
<li>&#x91CD;&#x542F; Restart notebook Kernel&#xFF0C;&#x91CD;&#x65B0;&#x6267;&#x884C;Matplotlib&#x4EE3;&#x7801;&#xFF0C;&#x4F1A;&#x91CD;&#x65B0;&#x751F;&#x6210;&#x7F13;&#x5B58;</li>
</ul>
</li>
</ul>
<p>&#x6548;&#x679C;&#xFF1A;</p>
<pre><code class="lang-python">plt.plot([<span class="hljs-number">3</span>,<span class="hljs-number">1</span>,<span class="hljs-number">5</span>,<span class="hljs-number">4</span>,<span class="hljs-number">2</span>])

plt.title(<span class="hljs-string">&apos;hello&#x4E2D;&#x6587;&#x6807;&#x9898;&apos;</span>)
plt.xlabel(<span class="hljs-string">&apos;X axis&apos;</span>)
plt.ylabel(<span class="hljs-string">&apos;Y&#x8F74;&#x503C;&apos;</span>)

plt.show()
</code></pre>
<p><img src="images/matplotlib22.png" alt="png"></p>
<hr>
<h1 id="&#x56FE;&#x50CF;&#x7F8E;&#x611F;&#x95EE;&#x9898;">&#x56FE;&#x50CF;&#x7F8E;&#x611F;&#x95EE;&#x9898;</h1>
<p>&#x9ED8;&#x8BA4;&#x7684;Matplotlib&#x751F;&#x6210;&#x56FE;&#x50CF;&#x4E0D;&#x592A;&#x597D;&#x770B;&#xFF0C;&#x53EF;&#x5728;&#x5934;&#x90E8;&#x8F7D;&#x5E93;&#x4EE3;&#x7801;&#x4E2D;&#x52A0;&#x4E00;&#x53E5;&#x914D;&#x7F6E;&#x4EE3;&#x7801;&#x4FEE;&#x6539;&#x5176;&#x6837;&#x5F0F;</p>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x4FEE;&#x6539;&#x6837;&#x5F0F;&#x4EE3;&#x7801;&#x5E94;&#x5199;&#x5728;&#x4FEE;&#x6539;&#x5B57;&#x4F53;&#x4EE3;&#x7801;&#x524D;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x8986;&#x76D6;&#x5B57;&#x4F53;&#x8BBE;&#x7F6E;&#x5BFC;&#x81F4;&#x4E2D;&#x6587;&#x51FA;&#x9519;</p>
<p><code>plt.style.use(&apos;seaborn&apos;)</code></p>
<hr>
<h1 id="&#x56FE;&#x50CF;&#x8F93;&#x51FA;&#x65B9;&#x5F0F;">&#x56FE;&#x50CF;&#x8F93;&#x51FA;&#x65B9;&#x5F0F;</h1>
<p><strong>&#x6CE8;&#x610F;&#xFF1A;</strong></p>
<ul>
<li>b&#x9B54;&#x672F;&#x547D;&#x4EE4;&#x540E;&#x9762;&#x4E0D;&#x80FD;&#x52A0;Python&#x6CE8;&#x91CA;</li>
<li>b&#x5207;&#x6362;&#x8F93;&#x51FA;&#x65B9;&#x5F0F;&#x65F6;&#x6709;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x91CD;&#x542F;Jupyter Notebook&#x5185;&#x6838;&#x624D;&#x80FD;&#x751F;&#x6548;&#xFF0C;&#x4F8B;&#x5982;qt5&#x548C;notebook&#x540E;&#x7AEF;</li>
<li>bGUI&#x8F93;&#x51FA;&#x9700;&#x8981;&#x8C03;&#x7528;&#x540E;&#x7AEF;/&#x4E8B;&#x4EF6;&#x6302;&#x94A9;&#xFF0C;&#x4F7F;&#x7528;&#x524D;<strong>&#x9700;&#x5B89;&#x88C5;&#x540E;&#x7AEF;&#x5E93;</strong>&#xFF0C;&#x4F8B;&#x5982;pyqt5&#xFF08;104M&#xFF0C;Anaconda&#x81EA;&#x5E26;&#xFF09;<ul>
<li><code>pip install pyqt5</code></li>
</ul>
</li>
</ul>
<pre><code class="lang-python"><span class="hljs-comment"># 1:&#x4F7F;&#x7528;Plt.show()&#x65B9;&#x5F0F;&#x8F93;&#x51FA;&#x56FE;&#x50CF;&#xFF0C;&#x6240;&#x6709;Python&#x73AF;&#x5883;&#x901A;&#x7528;</span>
plt.show()

<span class="hljs-comment"># 2&#xFF1A;%matplotlib &#x9B54;&#x672F;&#x547D;&#x4EE4;&#x65B9;&#x5F0F;&#xFF0C;&#x4EC5;&#x7528;&#x4E8E;IPython&#x7CFB;&#x5217;&#x73AF;&#x5883;</span>
<span class="hljs-comment"># &#xFF08;&#x5982;IPython&#x547D;&#x4EE4;&#x884C;&#xFF0C;&#x6216;Jupyter Notebook&#xFF09;</span>
<span class="hljs-comment"># &#x4E0D;&#x9700;plt.show()&#x5C31;&#x53EF;&#x4EE5;&#x8F93;&#x51FA;&#x56FE;&#x50CF;</span>

<span class="hljs-comment"># &#x9ED8;&#x8BA4;&#x4F7F;&#x7528;qt5&#x540E;&#x7AEF;&#xFF0C;GUI&#x754C;&#x9762;&#x663E;&#x793A;&#x56FE;&#x50CF;&#xFF0C;&#x56FE;&#x50CF;&#x53EF;&#x64CD;&#x4F5C;</span>
%matplotlib
%matplotlib qt5
%matplotlib auto

<span class="hljs-comment"># &#x76F4;&#x63A5;&#x5728;&#x9875;&#x9762;&#x5185;&#x8F93;&#x51FA;&#x56FE;&#x50CF;</span>
%matplotlib inline

<span class="hljs-comment"># Jupyter Notebook&#x4E13;&#x7528;&#x663E;&#x793A;&#x65B9;&#x5F0F;&#xFF0C;&#x5728;&#x9875;&#x9762;&#x5185;&#x63D2;&#x5165;GUI&#x754C;&#x9762;&#xFF0C;&#x56FE;&#x50CF;&#x53EF;&#x64CD;&#x4F5C;</span>
<span class="hljs-comment"># &#x5B50;&#x56FE;&#x4EE3;&#x7801;&#x8981;&#x653E;&#x5230;&#x4E00;&#x4E2A;cell&#x4E2D;&#xFF0C;&#x8F93;&#x51FA;&#x56FE;&#x50CF;&#x8C03;&#x6574;&#x5B8C;&#x6210;&#x540E;&#x9700;&#x53CA;&#x65F6;&#x70B9;&#x51FB;&#x53F3;&#x4E0A;&#x89D2;*&#x505C;&#x6B62;&#x4EA4;&#x4E92;*&#xFF0C;&#x5426;&#x5219;&#x540E;&#x9762;cell&#x7684;&#x56FE;&#x50CF;&#x4E5F;&#x4F1A;&#x753B;&#x5230;&#x540C;&#x4E00;&#x4E2A;&#x56FE;&#x50CF;&#x4E2D;</span>
<span class="hljs-comment"># &#xFF08;&#x56E0;&#x4E3A;&#x672C;&#x8D28;&#x4E0A;&#x56FE;&#x50CF;&#x90FD;&#x5728;&#x540C;&#x4E00;&#x4E2A;&#x9ED8;&#x8BA4;figure()&#x4E2D;&#xFF0C;&#x800C;&#x6BCF;&#x6B21;&#x6267;&#x884C;&#x56FE;&#x5F62;&#x90FD;&#x4F1A;&#x5237;&#x65B0;&#x91CD;&#x7F6E;&#xFF09;</span>
%matplotlib notebook
</code></pre>
<p>&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> matplotlib.pyplot <span class="hljs-keyword">as</span> plt

<span class="hljs-comment"># &#x5E38;&#x7528;&#xFF0C;&#x52A0;plt.show()&#xFF0C;&#x9ED8;&#x8BA4;&#x56FE;&#x50CF;&#x7F51;&#x9875;&#x8F93;&#x51FA;</span>
plt.plot([<span class="hljs-number">1</span>,<span class="hljs-number">5</span>,<span class="hljs-number">3</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>])
plt.show()

<span class="hljs-comment"># &#x4E0D;&#x9700;&#x8981;plt.show()&#xFF0C;GUI&#x8F93;&#x51FA;</span>
%matplotlib
plt.plot([<span class="hljs-number">1</span>,<span class="hljs-number">5</span>,<span class="hljs-number">3</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>])

<span class="hljs-comment"># &#x4E0D;&#x9700;&#x8981;plt.show()&#xFF0C;&#x7F51;&#x9875;&#x8F93;&#x51FA;</span>
%matplotlib inline
plt.plot([<span class="hljs-number">1</span>,<span class="hljs-number">5</span>,<span class="hljs-number">3</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>])

<span class="hljs-comment"># &#x4E0D;&#x9700;&#x8981;plt.show()&#xFF0C;notebook&#x8F93;&#x51FA;&#xFF0C;&#x5207;&#x6362;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x91CD;&#x542F;notebook&#x5185;&#x6838;</span>
%matplotlib notebook
plt.plot([<span class="hljs-number">1</span>,<span class="hljs-number">5</span>,<span class="hljs-number">3</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>])
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../Python可视化/绘图库-Matplotlib/4数学计算展示图像.html" class="navigation navigation-prev " aria-label="Previous page: 拓展：数学计算展示图像"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../Python可视化/绘图库-Matplotlib/6pylab.html" class="navigation navigation-next " aria-label="Next page: 拓展：pylab"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
